/*
* @Author: name
* @Date:   2018-10-03 18:59:23
* @Last Modified by:   name
* @Last Modified time: 2018-10-06 19:33:26
*/
import VueRouter from 'vue-router'

// 3.导入对应的路由组件
import HomeContainer from './components/tabber/HomeContainer.vue'
import MemberContainer from './components/tabber/MemberContainer.vue'
import SearchContainer from './components/tabber/SearchContainer.vue'
import ShopcarContainer from './components/tabber/ShopcarContainer.vue'
import NewsList from './components/news/NewList.vue'
import Newsinfo from './components/news/Newsinfo.vue'

// 1、创建路由对象
var router = new VueRouter({
    routes:[
        //4.编写路由规则
        { path:'/',redirect:'/home' },
        { path: '/home', component: HomeContainer },
        { path:'/member',component:MemberContainer },
        { path:'/search',component:SearchContainer },
        { path:'/shopcar',component:ShopcarContainer },
        { path:'/home/newslist' ,component:NewsList },
        { path:'/home/newsinfo/:id',component: Newsinfo}
    ],
    linkActiveClass:'mui-active'
})

// 2.把路由对象暴露出去
export default router